<template>
  <div>
    <div v-for="(item, i) in news_list" :key="i">
      <div class="top2">
        
        <div class="top101" align="left">
            <br>
          &emsp;{{ item.title }} <br />
          <font size="1" color="aaaaaa">&emsp;{{ item.value }}</font
          ><br /><br />
        </div>
        <div align="right">
            <br>
          <el-button v-if="item.sss == 1" @click="review(item.id, item.title)">进行审核</el-button>
          <el-button v-if="item.sss == 2" @click="review(item.id)" disabled>审核完成</el-button>
          &emsp;
        </div>
      </div><br><br>
      <hr size="10" color="eeeeee" />
    </div>
    <!--  -->
    <div></div>
    <!--  -->
    <div></div>
    <!--  -->
  </div>
</template>

<script>
export default {
  name: "",
  data() {
    return {
      news_list: [],
    };
  },
  props: {},

  components: {},

  created() {},

  mounted() {
    this.newsDataGet();
  },

  methods: {
    newsDataGet() {
      this.axios
        .get("/news/all", { params: { role_id: localStorage.role_id } })
        .then((res) => {
          console.log("获取新闻的像:", res);
          this.news_list = res.data.list;
        });
    },
    review(id, name){
        console.log(id)
        this.$router.push({'path': '/status', query: {id: id, name: name}})
    },
  },

  computed: {},

  watch: {},

  directives: {},

  filters: {},
};
</script>

<style scoped>
* {
  margin: 0;
}

.top2 {
  display: flex;
  justify-content:space-between;
}
.top101 {
    width: 550px;
    height: 30px;
    margin: 0 auto;
}
</style>
